package com.netbetter.langzheng.plugin.fileManager.reader;

/*
 * Ext GWT - Ext for GWT Copyright(c) 2007, 2008, Ext JS, LLC. licensing@extjs.com http://extjs.com/license
 */
import java.util.ArrayList;

import com.extjs.gxt.ui.client.data.DataReader;
import com.extjs.gxt.ui.client.data.ListLoadResult;
import com.extjs.gxt.ui.client.data.ModelData;

/**
 * 读FolderInfo
 * 
 * @author 嘉陵江里捉鱼
 * @param <C>
 */
public class FolderInfoReader<C> implements DataReader<C, ArrayList<ModelData>> {

    private FileInfoReader reader;

    public FolderInfoReader() {
    }

    public ArrayList<ModelData> read(C loadConfig, Object data) {
        reader = new FileInfoReader();
        ListLoadResult result = reader.read(loadConfig, data);
        if (result != null) {
            return (ArrayList<ModelData>) result.getData();
        }
        return new ArrayList<ModelData>();
    }

}
